<div class="grid_container">
    <?php echo validation_errors('<strong>*','</strong><br/>'); ?>
    <?php
    $attributes = array(
        'id' => 'formAddGroups',
        'class' => 'form_container'
    );
    echo form_open_multipart('category_products/submit', $attributes);?>
	<div class="grid_12">
		<div class="widget_wrap">
			<div class="widget_top">
				<span class="h_icon money"></span>
				<h6><?= isset( $group->id)? 'Editar':'Agregar'  ?>  Categoría</h6>
			</div>
			<div class="widget_content">
				<ul>
					<li>
						<div class="form_grid_12">
							<div class="form_input">
								<div class="form_grid_12 alpha">
									<span class="label_head">Nombre <span class="req">*</span></span>
									<?php
                                    $data = array(
                                        'name'        => 'description',
                                        'id'          => 'description',
                                        'class'       => 'noEmpty',
                                        'value'       => @field(set_value('description'), $group->description),
                                        'tabindex'    => '1',
                                        'required'    => 'required'
                                    );
                                    echo form_input($data);
                                    ?>
								</div>
								<span class="clear"></span>
							</div>
						</div>
					</li>
				</ul>
			</div>
	    </div>
		<br />
		<?php echo form_hidden("group_id", @field($group->id, "")); ?>
		<button type="submit" class="btn_small btn_orange"><span>Guardar</span></button>

			 <?php  if(isset($group->id)){?>
                <button type="button" class="btn_small btn_orange"><span><a id="buscar_guia" href="<?php echo base_url(); ?>index.php/category_products/">Cancelar</a></span></button>
                <?php } else{?>
 				<button type="button" class="btn_small btn_orange"><span><a id="buscar_guia" href="<?php echo base_url(); ?>index.php/category_products/add">Cancelar</a></span></button>

                <?php }?>
	</div>
    <?php echo form_close(); ?>
	<span class="clear"></span>
</div>